//
//  GYMarksetCenterListViewModel.m
//  GYDemo
//
//  Created by Mrzhang on 2018/4/2.
//  Copyright © 2018年 mac. All rights reserved.
//

#import "GYMarksetCenterListViewModel.h"
#import "Head.h"
@implementation GYMarksetCenterListViewModel
#pragma mark - getter and setter
-(NSMutableArray *)datas
{
    if (!_datas) {
        _datas = [NSMutableArray new];
    }
    return _datas;
}
-(instancetype)init
{
    if (self = [super init]) {
        //添加接口特殊处理
        [[InterfaceManager shareInterface].specialInterfaces addObject:@"markertCenter"];
        
    }
    return self;
}
#pragma mark - method
-(void)doRequsetData:(NSMutableDictionary *)para
{
    @WeakSelf;
    NSString *interface = @"markertCenter";
    [[InterfaceManager shareInterface]requetInterface:interface withParameter:para handler:^(NSDictionary *info, InterfaceStatusModel *infoModel) {
        NSArray *data = (NSArray*)info;
        NSMutableArray *arr =[NSMutableArray new];
        for (NSDictionary *dic in data) {
            GYHomeMarketInfoModel *model = [GYHomeMarketInfoModel yy_modelWithJSON:dic];
            [arr addObject:model];
        }
        [selfp setDatas:arr];
        
        
    }];
}
@end
